added some directives, login functionality