login functionality in the process