Added logout feature and profile page.

Added logout feature and profile page integration with database.