Added login to theme, cleaned up PHP.