added base.php
done register class
changed include with __DIR__ to amke it general
handled the request of register in main
added toJson and isLoggedin to it
done login
modified to be compatible with login
removed toJson as added in base
added register, login, logout to main, improved question promo to be campatible with login