Added login funtionality