Add some codes related to login process