Bugfix in authentication