Finish login functionality