Fix the bug in login and register form