Updating application to handle login