login controller made common