The things spring to mind:
1) You clearly know about parameterized queries, so why the heck are you concatenating strings to check if the username exists where it is the most dangerous? You leave yourself wide open to SQL injection which can damage or destroy your database, and nobody has to be logged in to do it!
2) Why do you take an integer value, convert it to a string, then convert it back to an integer again in order to check it?
int temp = Convert.ToInt32(com.ExecuteScalar().ToString());
And then - apart from telling the user it's in use, you don't actually do anything about it!
3) Please, never store passwords in clear text! It is a major security risk... See here:
Password Storage: How to do it.[
^]
So what are you doing here? Guessing? Copy and pasting without bothering to think about it? Or just throwing it together and hoping?
Stop, think, and try again.
But if you are trying to invent your own login system - and the rest of it continues in the same vein - than you have a complex, difficult to work with and probably very insecure website coming up...
Please, do yourself a favour, and use existing systems:
Introduction to Membership[
^]