Cockpit doesn't work if the user you are trying to log in as has a default shell other than bash. If you're using SSSD, you can override this with override_shell = /bin/bash.
override_shell = /bin/bash