Fix some issues with login, Add remember me (might be incomplete)