Added login support
Added permission policies