Fixed the bug which causes the screen to become black after a successful login