Added logic controller for login