session updates

updates to session and login logic.
added building.php
updated querys