login feature slightly added(almost migrated from the one made in CakePHP2.5.1)