Fixed problem with authentication