added login funcionality