added login module and corresponding logic