added code to process user login