Fixing login page and view funct.