Fixed the login script to show login when needed.