added login funtionality