login controller updated for redirect