Fix for several login issues