Added login controller with localauth switch