Moved code that outputs HTML to views

Devided login logic from logic of the movie database