Fixed some issues pertaining to persisting login