refacored login

finalized the login login which checks the user’s Role ID and send to a
different pages depending upon the role of the user