The major concern in Wireless LANs is security. So in this paper to fix security loopholes a public key authentication and key-establishment procedure has been proposed which fixes security loopholes in current standard. The public key cryptosystem is used to establish a session key securely between the client and Access point. A client-agent based rouge access point detection system was developed to counter the threat of rouge access points in wireless LANs and are difficult to handle at the protocol level. Hence a centralized RAP was developed for organization where the area is quite large to cover manually or form a single location. An algorithm was also developed to detect Evil-Twin Access points, which cannot be detected by traditional methods.