Converted database stuff to DBO and added sessions to control whats shown on index page depending on login status.