Bugfix for authentication