Move login out of app processing