Add login function to Login page