First off, don't store your passwords in clear text - it is a very bad idea from a security point of view. There are some notes here that will help:
Password Storage: How to do it.[
^]
Secondly, why are you doing all this manually? Why not use the Membership system, which will mean that you don't have to check for user logged in on each page, because it won't allow non-users access to the page in the first place?
Introduction to Membership[
^] It also provides all the common facilities...