Move login action into handler