added size selector
added error handling of login page
moved controller logic from front controller