added login page and corresponding logic