Login process is now much smoother. Moved all the code to view will appear