add a login module to replace the core logic
enable login module
move login functionality to a module